Static code analysis tools are commonly used by software engineers to analyze code and identify problems early on in the development cycle. Static code analyzers can be run against a single file, a collection of files within a project, or even an entire build. However, even when run against a single file, the number of results returned can be overwhelming. A single file may generate as many as hundreds or thousands of errors, especially when the code examined is large, old, and/or complex. Some of these reported complaints may be irrelevant or of no interest to the developer. For legacy code, there is a risk of introducing regressions if a user tries to “fix” tool reported potential problems, another drawback of returning all results. For example, a developer may not be interested in all the results, but only the ones related to his or her own code changes. Currently, there is no easy solution that allows a developer to view only those results related to his or her changes.
Static code analysis tools have been around for quite a few years. However, none of these tools allow the user to focus only on the problems introduced by his or her code changes. For example, such tools can be run against entire code files, but not on new changes only. Thus, the developer is forced to view an entire set of errors instead of new errors. In view of the foregoing, there exits a need for an approach that solves at least one of the above-referenced deficiencies.